﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Task/Task.master" AutoEventWireup="true"
    CodeFile="BaseDocEdit.aspx.cs" Inherits="Task_BaseDoc_BaseDocEdit" StylesheetTheme="Content" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="JavaScript">
        function addFile() {
            var str = '<br/><INPUT type="file" size="60" NAME="File">'
            document.getElementById('MyFile').insertAdjacentHTML("beforeEnd", str)
        }
   
    </script>

    <table width="770px" cellpadding="0" cellspacing="0" class="intable">
        <caption>
            <asp:Label runat="server" ID="Caption"></asp:Label>
        </caption>
        <tr>
            <td style="width: 80px;">
                档案类别：
            </td>
            <td >
                <asp:DropDownList ID="ddlType" runat="server" AutoPostBack="True" DataTextField="TypeName"
                    DataValueField="ID" OnSelectedIndexChanged="ddlType_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:DropDownList ID="ddlClass" runat="server" DataTextField="TypeName" DataValueField="ID">
                </asp:DropDownList>
                存档年月：<asp:DropDownList ID="DptYear" runat="server">
                </asp:DropDownList>
                <asp:DropDownList ID="DptMonth" runat="server" >
                </asp:DropDownList>
            </td>
            <td >
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                档案名称：
            </td>
            <td colspan="3">
                <asp:TextBox ID="txtCaption" runat="server" Width="80%"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbladd" runat="server" Text="稿件网址："></asp:Label>
            </td>
            <td colspan="3">
                <asp:TextBox ID="txtAddress" runat="server" Text="Http://" Width="80%"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td valign="top">
                <asp:Label ID="lbldltlist" runat="server" Text="附件："></asp:Label>
&nbsp;</td>
            <td colspan="3">
                <asp:DataList ID="dltList" runat="server" RepeatColumns="2" DataKeyField="ID">
                <ItemTemplate>
                <img src="../../Images/attachment.gif" />
                    <asp:LinkButton ID="lbtnDownload" runat="server" CommandName='<%# Eval("FileTitle") %>' Text='<%# Eval("FileTitle") %>' 
                        CommandArgument='<%# Eval("FileName") %>' oncommand="lbtn_Command"></asp:LinkButton>    &nbsp; <asp:ImageButton ID="ibtnDelete" runat="server"  Visible="false"
                        CommandArgument='<%# Eval("ID") %>' ImageUrl="~/Images/delete.gif" 
                        OnClientClick="return confirm('确定要删除此附件吗？')" oncommand="ibtnDelete_Command" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </ItemTemplate>
                </asp:DataList>
                <asp:Panel ID="pn" runat="server" Height="150px" Width="543px" ScrollBars="auto">
                    <div align="Left">

                      <p id="MyFile">
                             <asp:FileUpload ID="FileUpload2" Width="510px" runat="server" /></p>
                         <%=GetButton() %>
                        &nbsp;
                        <p>
                            <asp:Label ID="strStatus" runat="server" BorderColor="White" BorderStyle="None" 
                                Font-Bold="True" Font-Names="宋体" Font-Size="9pt" Width="500px"></asp:Label>
                        </p>
                    </div>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td colspan="3">
                <asp:Button ID="btnAdd" runat="server" Text="保存" onclick="btnAdd_Click" />
                &nbsp;<input id="ButtonCancel" class="button_default" onclick="window.location='BaseFileList.aspx';"
                    type="button" value="返 回" />
                <asp:Label ID="lblPrompt" runat="server" ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td colspan="3">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td colspan="3">
                &nbsp;
            </td>
        </tr>
    </table>
</asp:Content>
